package com.jin.webvideo.videoCache.policy.operation;

public class InOpeartion extends EqualOperation{
    @Override
    public boolean compute(Object var, String value) {
        if (value.startsWith("[") && value.endsWith("]")){
            value = value.substring(1, value.length() - 1);
            String[] values = value.split(",");
            for (String item : values){
                if (super.compute(var, item)){
                    return true;
                }
            }
        }
        return false;
    }

    @Override
    public String getSymbol() {
        return "in";
    }
}
